package com.student.work.mapper;

import com.student.work.model.UserAttendance;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Mapper
@Repository
public interface UserAttendanceMapper {

    int insert(UserAttendance attendance);

    int update(UserAttendance attendance);

    UserAttendance getAttendance(UserAttendance attendance);

    int getCount(@Param("studentId") long studentId,
                 @Param("jobId") Long jobId);

    List<UserAttendance> getList(@Param("pageNum") int pageNum,
                                 @Param("pageSize") int pageSize,
                                 @Param("studentId") long studentId,
                                 @Param("jobId") Long jobId);

    List<UserAttendance> getListByTime(@Param("start") Date start,
                                       @Param("end") Date end);
}